﻿using Company.Core.Models;
using Prism.Commands;
using Prism.Mvvm;
using Prism.Regions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace Company.Application.Main.ViewModels
{
    internal class MainViewModel : BindableBase
    {
        public ICommand NavigationCommand { get; }
        private IRegionManager RegionManager { get; }
        public MainViewModel(IRegionManager regionManager)
        {
            RegionManager = regionManager;
            NavigationCommand = new DelegateCommand<string>(OnNavigationCommand);
        }

        private void OnNavigationCommand(string viewName)
        {
            RegionManager.RequestNavigate(Names.MainRegion, viewName);
        }
    }
}
